package com.weimengchao.domain;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @description:
 * @author: 魏孟超
 * @createDate: 2021-10-09 23:04
 */
@RefreshScope
@Component
@Data
public class NacosConfig implements Serializable {

    @Value("${config.name}")
    private String name;

    private Long time;

    public NacosConfig() {
        time = System.currentTimeMillis();
        System.out.println("配置刷新 构造 " + time);

    }

}
